<template>
	<view class="container">
		<uni-section title="食物评论列表展示" sub-title="" type="line">
			<navigator url="../commentdetail/commentdetail">
				<uni-list>
					<uni-list-item :title="item.comment" note="" :rightText="item.postdate" v-for="item in list">
					</uni-list-item>
				</uni-list>
			</navigator>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		methods: {

		},
		onLoad() {
			uni.request({
				url: 'http://localhost:8090/foodapp/comment/list',
				method: 'POST',
				data: {},
				success: res => {
					if (res.data.success) {
						this.list = res.data.list
					} else {

					}
				},
				fail: () => {},
				complete: () => {}
			});

		}
	}
</script>

<style>
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
</style>
